var express = require('express');
var HotRouter = express.Router();
// 图片上传
const multer = require('multer')
const upload =  multer({dest:'public/hotsuploads/'}) 

const HotController = require('../../controller/admin/HotController')
HotRouter.post("/adminapi/hots/addHot",upload.single('file') ,HotController.addHot)
HotRouter.post("/adminapi/hots/updateHot",upload.single('file') ,HotController.updateHot)

HotRouter.get("/adminapi/hots/hotsList",HotController.getHotsList)
HotRouter.get("/adminapi/hots/hotsList/:id",HotController.getHotsList)

HotRouter.put("/adminapi/hots/publish",HotController.publish)
HotRouter.delete("/adminapi/hots/delete/:id",HotController.deleteHot)


module.exports = HotRouter